package com.zfzs.post.modules.agent.service;

import com.zfzs.post.modules.agent.domain.AgentInfo;
import com.zfzs.post.modules.agent.service.dto.AgentInfoDTO;
import com.zfzs.post.modules.agent.service.dto.AgentInfoQueryCriteria;
import com.zfzs.post.modules.agent.domain.AgentInfo;
import com.zfzs.post.modules.agent.service.dto.AgentInfoDTO;
import com.zfzs.post.modules.agent.service.dto.AgentInfoDTO;
import com.zfzs.post.modules.agent.service.dto.AgentInfoQueryCriteria;
import org.springframework.data.domain.Pageable;

//import org.springframework.cache.annotation.CacheConfig;
//import org.springframework.cache.annotation.CacheEvict;
//import org.springframework.cache.annotation.Cacheable;

/**
* @author ck
* @date 2019-08-07
*/
//@CacheConfig(cacheNames = "agentInfo")
public interface AgentInfoService {

    /**
    * queryAll 分页
    * @param criteria
    * @param pageable
    * @return
    */
    //@Cacheable(keyGenerator = "keyGenerator")
    Object queryAll(AgentInfoQueryCriteria criteria, Pageable pageable);

    /**
    * queryAll 不分页
    * @param criteria
    * @return
    */
    //@Cacheable(keyGenerator = "keyGenerator")
    public Object queryAll(AgentInfoQueryCriteria criteria);

    /**
     * findById
     * @param id
     * @return
     */
    //@Cacheable(key = "#p0")
    AgentInfo findById(Long id);

    /**
     * create
     * @param resources
     * @return
     */
    //@CacheEvict(allEntries = true)
    AgentInfo create(AgentInfo resources);

    /**
     * update
     * @param resources
     */
    //@CacheEvict(allEntries = true)
    void update(AgentInfo resources);

    /**
     * delete
     * @param id
     */
    //@CacheEvict(allEntries = true)
    void delete(Long id);

    AgentInfo findByNickName(String nickName);
}